Path
Part 1/3 • 5.9 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
A path is a node's local knowledge of the most optimal next hop towards a destination.
The node learns this passively from the destination's announce packet by recording in its path table which node the announce was received from, the interface on which it arrived and other information.
Transport nodes will maintain and persist their path tables, participate in network routing and respond to path requests.
No single node knows the full sequence of hops to a destination. The full route "emerges" from each node forwarding packets one hop closer to the destination, each node knowing only the next hop. There is no global routing table, and paths are dynamically updated as network topology changes.
Note: In the manual and elsewhere, path can sometimes mean the full route from a source to a destination. On this wiki, path is used only in its technical sense, as it is used in the code, while route denotes a full sequence of hops.
Contents
Table
A node's path table maps destination hashes to information needed to route packets, learned from the destination's announce packet:cite-ref-1[1]
1. IDX_PT_TIMESTAMP: Timestamp of when the entry was created or last updated
2. IDX_PT_NEXT_HOP: The node the announce was received from (as a destination hash)
3. IDX_PT_HOPS: Number of hops to the destination
4. IDX_PT_EXPIRES: Timestamp of when the entry expires (depends on the interface mode of IDX_PT_RVCD_IF)
5. IDX_PT_RANDBLOBS: List of random blobs of the most recently seen announces for the destination (used to detect replayed announces)
6. IDX_PT_RVCD_IF: The interface the announce was received on
7. IDX_PT_PACKET: Hash of the cached announce packet (used for deduplication)
Entries are replaced when the node learns of a better path, and removed when paths expire or their interface disappears.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────